import Vue from 'vue';
import Router from 'vue-router';
import routerList from './routers';

Vue.use(Router)

const router = new Router(routerList)
// 根据路由设置标题
router.beforeEach((to, from, next) => {
    if (to.meta.title) {
        document.title = to.meta.title
    }
    next();
})

export default router;